<?php
class My_Forms_Admin_Login extends Zend_Form {
	public function __construct($options = null) {
		parent::__construct ( $options );
		$this->setName ( 'login' );
		
		$userName = new Zend_Form_Element_Text ( 'userName' );
		$userName->setLabel ( '用户名:' )->setRequired ( true )->addValidator ( 'NotEmpty' );
		
		$passWord = new Zend_Form_Element_Password ( 'passWord' );
		$passWord->setLabel ( '密码:' )->setRequired ( true )->addValidator ( 'NotEmpty', true );
		
		$submit = new Zend_Form_Element_Submit ( 'submit' );
		$submit->setLabel ( '登陆' );
		
		$this->addElements ( array ($userName, $passWord, $submit ) );
		//		$this->clearDecorators ();
	//		$this->addDecorator ( 'FormElements' )->addDecorator ( 'HtmlTag', array ('tag' => '<ul>' ) )->addDecorator ( 'Form' );
	//		
	//		$this->setElementDecorators ( array (array ('ViewHelper' ), array ('Description' ), array ('Label', array ('tag' => null, 'separator' => ' ' ) ), array ('HtmlTag', array ('tag' => 'li', 'class' => 'element-group' ) ) ) );
	}
}

?>